import React, { Component } from 'react';
import {connect} from "react-redux";
class Pass extends Component {
    state={a:1};
    render() {
        return (
            <div style={{display:'inline-block'}}>
                <input type="text" disabled={this.props.val}/>
                <span>计算值{this.props.count}</span>
            </div>
        );
    }
}

function mapStateToProps(state,ownProps) {
    return {
        count: state.counter.count,
        val:state.counter.switch
    }
}

export default connect(mapStateToProps)(Pass);
